1. Field of the Invention
The present invention relates to a digital acoustic signal coding apparatus, a method of coding a digital acoustic signal, and a recording medium for recording a program of coding the digital acoustic signal, in particular, the compression/coding of a digital acoustic signal utilized in, for instance, DVD recording/reproducing or in a digital broadcast, etc.
2. Discussion of the Background
The background arts are discussed with the main focus being on the compression of an acoustic signal.
At present, in the digital audio field, MP3 is a very popular coding technique MP3 is an abbreviation for an acoustic signal compression coding method called xe2x80x9cMPEG-1 Audio Layer IIIxe2x80x9d. By employing MP3, digital audio such as data used for a CD, can be compressed to the extent of 1/11 without deteriorating the sound quality. Because of the convenience of compressing a large volume of acoustic data to a compact size that can be transmitted in a short time, MP3 is becoming popular for transmissions on the internet. At present, reproducing apparatuses suitable for use with MP3 are being introduced by several manufacturing companies, and some music distributing businesses are being operated using it.
On the other hand, even in the field of digital broadcasting, in accordance with the development of digitalization, the adoption of sound signal (acoustic signal) compressing technology has become common. At present, the method of MPEG-2 Audio BC is employed in CS broadcasting. Furthermore, the method of MPEG-2 Audio AAC is scheduled to be employed in BS and digital broadcasting of the wave on the ground, both to be started in 2000 or in subsequent years.
The above-mentioned matters relate to technology belonging to international standard of acoustic signal compression all called xe2x80x9cMPEG Audioxe2x80x9d. In addition to MPEG Audio, for instance, acoustic signal compressing methods such as Dolby Digital (AC-3) and ATRAC, are used for DVD and MD.
As stated above, the use of compression/coding technology for digital audio has become more and more familiar day by day. The fundamental technology of acoustic signal compressing and the recent trends thereof are described hereinafter.
In acoustic signal compressing, acoustic signals are largely classified into xe2x80x9cvoice soundxe2x80x9d and xe2x80x9cmusical soundxe2x80x9d categories. Here, voice sound signifies the human voice and musical sound signifies not only the human voice, but also any general acoustic signal including music, life sound, natural sound, etc. The reason why sound has to be classified is that the object and utilized technology of the coding differs for each.
In voice sound coding, the human voice signal of low sampling rate of about 8-16 KHz is compressed for use with a low bit rate such as over a telephone circuit. On the other hand, in musical sound coding an acoustic signal of a high sampling rate of about 32-96 KHz is compressed keeping the sound quality as high as possible. In the former method, deterioration of sound quality cannot be avoided compared with the original sound, while, in the latter method, sound compression which fundamentally does not degrade the sound can be accomplished. Both of MP3 and AAC are included in the latter coding (musical sound coding).
The compressing of digital information is classified into two methods; reversible compression and non-reversible compression. In the former method, the original signal can be faithfully reproduced at the time of decoding. However, in the latter method, the distortion of the signal generally occurs. For performing acoustic signal compression coding, both of those methods are suitably combined. First, the reversible compression method is described.
Here, Huffman code employed also in MPEG Audio as the representative reversible compression method is described. Huffman coding is a method in which short code and long code are respectively allocated to a large frequency value and a small frequency value in accordance with an appearance frequency of the original signal value, and the signal is compressed such that the entire code value is made as small as possible. A code which is not of constant length is called a variable-length code, while a code of constant length for all values is called a fixed-length code. The original signal of acoustic compression is a fixed-length code represented by a number of bits of the respective constant digital sample values (16 bits in the case of CD).
FIG. 21 shows an example of such a fixed-length code and a Huffman code, and FIG. 28 shows an example of allocating such a code to an actual numerical value row utilizing the above-mentioned two codes. As shown in FIG. 21, in order to discriminate six sorts of different original signal value with the fixed-length code, it is necessary to allocate at least a 3 bit code to the respective values.
On the other hand, as is apparent from the numerical value row as shown in FIG. 28, if the appearance frequency of xe2x80x9c2xe2x80x9d is largest (e.g., 7 times) and the appearance frequencies ofxe2x80x9c1xe2x80x9d and xe2x80x9c5xe2x80x9d are smallest (e.g., once), here, regarding the Huffman code shown in FIG. 21, a 2-bit code is allocated to xe2x80x9c2xe2x80x9d and a 4-bit code is allocated to xe2x80x9c1xe2x80x9d and xe2x80x9c5xe2x80x9d. Regarding the other remaining values, a code of a length corresponding to the respective appearance frequencies is allocated thereto.
An important property of a Huffman code is that the original signal row can be decoded to have one meaning. In the example of FIG. 21, if the Huffman code row is xe2x80x9c00110xe2x80x9d, the original signal row is xe2x80x9c20xe2x80x9d. Since there is a one-meaning property for decoding, Huffman coding is reversible.
For reference, an example of a code not capable of decoding to have one meaning is also shown in FIG. 21. In this example, when the code row xe2x80x9c000001xe2x80x9d is received, it is impossible to distinguish which of the meanings of the original signal (xe2x80x9c25xe2x80x9d, xe2x80x9c13xe2x80x9d, or xe2x80x9c223xe2x80x9d) was intended. Moreover, since a method of constructing a code capable of decoding with one meaning has been already shown, the description thereof is omitted here.
Now, in the case of allocating a fixed-length code, such as shown in FIG. 21, to a numerical value row, such as shown in (a) of FIG. 28, the code row becomes the one shown in (b) of FIG. 28, and the entire code amount turns out to be 3xc3x9720=60 bits. On the other hand, in the case of allocating a Huffman code, as also shown in FIG. 21, to a numerical value row shown in (a) of FIG. 28, the code row becomes one such as shown in (c) of FIG. 28, and the entire code amount turns out to be smaller (46 bits). In such a way, the entire code amount is further reduced in the case of allocating a Huffman code as compared with the case of a fixed-length code. Namely, when Huffman code is employed, the original signal value can be faithfully reproduced with a smaller code amount as compared with a fixed-length code. However, there is a limitation as to the compression factor, e.g., almost 77% as to the upper limit. Accordingly, it is impossible to expect a high compression factor, e.g., 1/11 in such a situation as mentioned above. Therefore, the technology of non-reversible compression is inevitably required. The basic quantization technology therefor is described hereinafter.
The use of quantization signifies the use of a method of classifying the level of the original signal value into plural steps and causing the values representing the respective levels to correspond to a restoring value (decoded) value. The above-mentioned method is described with reference to the example of FIG. 22.
Here, it is assumed that the original signal value is distributed as an integer between 0 and 60. When the value is converted to the fixed-length code as it is with a binary number, the respective value has to be expressed with bits. In this example, the original signal value is quantized to 6 levels and caused to correspond to the respective restored (decoded) values as shown in FIG. 22.
At the time of coding, the original signal value is divided by xe2x80x9c10xe2x80x9d and the decimal fraction part is removed (cut down). The above noted xe2x80x9c10xe2x80x9d is called the scale factor. The integer part of the quotient is limited to six sorts of values 0-5. The above method is called xe2x80x9cquantizationxe2x80x9d. As shown in FIG. 22, it is sufficient to express each of these values with a 3-bit fixed-length code, and, thereby, a compression factor of 50% can be realized. Furthermore, if the quantized value is converted to a Huffman code corresponding to the respective appearance frequencies, the compression factor can be further improved. FIG. 22 shows the case of allocating the Huffman code illustrated in FIG. 21 as an example.
At the side of the decoding, the quantized value is firstly restored (decoded) from the Huffman code. However, the method can be performed with one meaning as mentioned before. Thereafter, the quantized value is multiplied by the aforementioned scale factor xe2x80x9c10xe2x80x9d and added to xe2x80x9c5=10/2xe2x80x9d. In such way, the value is restored (decoded). However, the original signal value does not coincide with the restored value in general, and therefore an error occurs. Such an error is called a xe2x80x9cquantization errorxe2x80x9d. A concrete example of such errors is shown in FIG. 23.
In such a way, in utilizing quantization, the original signal value cannot be completely restored. In that sense, although quantization is non-reversible, the compression factor thereof can be improved, owing to that non-reversible quantization. Moreover, the extent of compression corresponds to the number of levels of quantization. The less the number of levels, the more the acoustic signal can be compressed. However, the average quantization error is also increased.
The compression of the digital information has been generally described. Both Huffman code and quantization are basic technology widely used for the compression of an acoustic signal, a static-picture signal and a dynamic (moving)-picture signal.
Next, xe2x80x9cmasking effectxe2x80x9d and quantization error are further described hereinafter. The aforementioned quantization error results in the deterioration of sound quality in acoustic signal compression. On the other hand, for the coding of the musical sound, the acoustic signal data is required to be compressed without deterioration of sound quality.
As to the method of determining the optimum number of levels of quantization, the property of human hearing called the xe2x80x9cmasking effectxe2x80x9d is taken advantage of. This xe2x80x9cmasking effectxe2x80x9d is a phenomenon in which a large volume sound erases (puts out or extinguishes) a surrounding small volume sound. The phenomenon has become widely familiar. To state it a little more precisely, a strong sound of a certain frequency erases a weak sound of another frequency neighboring (in the neighborhood of) the strong sound frequency.
The details of the above masking effect are further described hereinafter. The relationship between the frequency (KHz) represented by the horizontal coordinate (abscissa) and the sound intensity represented by the vertical coordinate (ordinate), and the sound intensity distribution of the input acoustic data on the both coordinates are described. Here, for instance, the input sounds (b) and (c) are masked or effectively erased by the further strong sound (a) such that both of (b) and (c) cannot be heard. This is the xe2x80x9cmasking effect.xe2x80x9d The masking threshold value signifies a boundary (border line) between audible sound and inaudible sound.
Furthermore, the human ear has an inherent characteristic having an absolute threshold value (or minimum audible threshold value) that represents the minimum sound (intensity) which a human can hear in a quiet environment. The human ear has its sharpest (most sharp) sensitivity for sound in the neighborhood of 2 KHzxcx9c5 KHz. The human ear gradually becomes unable to hear sound of frequencies lower than 2 KHz or higher than 5 KHz.
Here, the masking threshold value changes in accordance with the input acoustic signal data. However, it is important to note that the absolute threshold value does not change at all.
In conclusion, among all sound, only sound of an intensity stronger than the masking threshold value and the absolute threshold value is in the audible area. As a result, even though the information content of sound in the other area (in the inaudible area) is removed, the human ear can hear the sound in the same state as that of the initial input sound.
In acoustic signal compression, utilizing such property of using this masking effect, only input acoustic signal data having a higher level than the masking threshold value, that is, data in the gray area, is coded, and thereby, the amount of data is greatly reduced.
In actuality, both of the above noted threshold values correspond to the tolerable upper limit of the aforementioned quantization error. Namely, when input acoustic signal data is quantized, if the quantization error does not exceed the larger one of both of the threshold values, the human ear does not sense the deterioration of audible sound quality. In the area of a small threshold value, if the number of quantization levels is not made large, the deterioration of sound quality may become prominent. On the other hand, in the area of a large threshold value, it may be allowable to reduce the number of quantization levels.
Next, the method of converting input acoustic signal data is described hereinafter. Input acoustic data is generally represented (expressed) as a row of digital sample value in the time direction. However, the aforementioned masking effect cannot be suitably applied to such a row as it is. For this reason, it is necessary to convert the row of the above-mentioned digital sample value so that it can be easily processed.
There are several methods of converting the input acoustic signal data. One of them is a method of combining into a block the data row in the time area (domain) per constant samples number and converting the data row to a data row in the frequency area (domain) per same constant samples number. FIG. 24 shows the waveforms of the acoustic signals before and after the above conversion. More particularly, FIG. 24A shows the waveform of the acoustic signal data row of 1,024 samples in the time area, and FIG. 24B shows the data row converted to the waveform of the acoustic signal data row of 1,024 samples in the frequency area.
Generally, when an acoustic signal is converted from the time area or domain to the frequency area or domain, a deviation of the sound amount (energy) occurs in a certain frequency area. For instance, as shown in FIGS. 24A and 24B, although the signal value is uniformly distributed in the time area, the energy of the acoustic signal in the frequency area is deviated to the low frequency side. At the time of coding, the bit is distributed, putting emphasis, onto the part where the energy is concentrated. As a result, the compression efficiency can be further improved.
Moreover, regarding the conversion of the time area to the frequency area, there exist several methods; e.g., DFT (Digital Fourier Transform), and DCT (Digital Cosine Transform), etc. However, for the purpose of compressing image (picture) data and acoustic data, DCT and its modification MDCT (Modified Digital Cosine Transform) are most frequently utilized.
Regarding the conversion of input acoustic signal data, in addition to the above-mentioned methods, there exists a method of subband division. In the subband division method, the band of the input waveform is divided into plural frequency bands, and the respective divided waveform is kept in the time area. This is different from the above time area to frequency area conversion method.
Moreover, if input data composed of samples of the number m are divided into sample bands of the number n, the samples number of the respective subbands becomes m/n. FIG. 25 shows a simple example of dividing the input waveform into two subbands.
Next, the flow of the basic process of acoustic signal compression coding is described. The most basic technology utilized for acoustic signal coding has been thoroughly described heretofore. Here, the flow of the basic process of acoustic signal compression coding obtained from the combination of the above-mentioned processes is summarized relative to FIG. 26 which shows the flow.
At first, input acoustic signal data is converted from the time area to data in the frequency area or subband division is practiced as to this input acoustic signal data. Next, the respective sample values after conversion are quantized. At this time, the masking threshold value of the acoustic signal data are calculated in parallel, and the upper limit of the quantization error in the respective frequencies is previously obtained from the combination of the above calculated threshold value with the absolute threshold value. The above-mentioned step is performed by the audio psychology model part shown in FIG. 26. Quantization is performed such that the error does not exceed the upper limit thereof. Finally, the Huffman code is allocated in accordance with the appearance frequency of the respective quantization, and then final coding data are created.
Furthermore, the above mentioned step shows the outline of the most basic process of acoustic signal compression coding. In a practical coding method such as MP3, AAC, etc., various processes in addition to the above can be devised, and thereby an improvement of the compression factor can be obtained.
Here, the coding process of MP3 is described, putting focus on the difference between MP3 and AAC. The flow of the basic process is:
(1)conversion to the Frequency Area,
(1) Quantization and
(1) Huffman Coding.
Next, subband division and MDCT are described. FIG. 27 shows the flow of the coding process for MP3 putting focus on subband division and the MDCT process. The big difference between MP3 and AAC is that the subband division process is done before MDCT in MP3. As noted above, subband division signifies the division of input data into plural frequency bands. This data is arranged on a time axis in the respective division areas.
In MP3, the input data is divided into 32 bands, and MDCT is practiced per each of the respective divided bands. As in the case of AAC, two sorts of the window functions of LONG/SHORT type can be used. The length of a LONG type is 36 samples, while the length of a SHORT type is 12 samples. However, contrary to AAC, MP3 include both of the LONG/SHORT type. In FIG. 27, high frequency is used for the SHORT type and low frequency is used for the LONG type. Needless to mention, it may be allowable to use the all frequency for the SHORT type or for the LONG type. Moreover, in AAC, the length of the LONG type window is 2,048 samples. In MP3, the conversion calculation of the above-mentioned 36 samples to the length before the subband division is done, the calculated value becomes equal to 36xc3x9732=1,152 samples.
In high-quality compression/coding of a digital acoustic signal, the psychological property of human hearing has been utilized as noted above. According to such property, a small sound is masked by a large sound. As a result, the small sound cannot be heard. Namely, when a large sound of a frequency is emitted, the small sound of a frequency near the above noted large sound frequency cannot be heard by the human ear. Here, the limited (critical) sound intensity which cannot be heard due to such masking is called xe2x80x9cmasking threshold valuexe2x80x9d.
On the other hand, the human ear has the property that sensitivity to sound having a frequency near 4 KHz is highest, and the more distant any sound frequency is from 4 KHz, the lower the sensitivity of the ear gradually becomes. Such property is expressed as the critical sensitivity capable of sensing the sound in a quiet situation, and the sensitivity is called xe2x80x9cabsolute audible threshold valuexe2x80x9d.
The above-mentioned matters are further described hereinafter referring to FIG. 9 illustrating the intensity distribution of an acoustic signal. In FIG. 9, a wide solid line (A), a dotted line (B), and a fine solid line (C), respectively, represent the intensity distribution of an acoustic signal, a masking threshold value for the acoustic signal, and an absolute audible threshold value. As shown in FIG. 9, the human ear can sense only the sound of the intensity larger (stronger) than the masking threshold value and the absolute audible threshold value for the acoustic signal. Consequently, even though only the information of the portion larger than the masking threshold value and the absolute audible threshold value for the acoustic signal are taken out of the intensity distribution of the acoustic signal, the information is sensed by the human ear to the same extent as the initial acoustic signal.
In the coding of the acoustic signal, the above matter is equivalent to coding only the portions shown by the slanted lines in FIG. 9. However, the entire area of the acoustic signal is divided into plural small areas and the coding bit allocation is performed here in units of divided band width (D). The transverse width of the respective areas shown by the slanted lines corresponds to the divided band width.
In the respective divided band widths, sound of intensity not larger than that of the lower limit of the slanted area cannot be heard by the human ear. Therefore, if the intensity error of the original sound and the coded/decoded sound does not exceed the lower limit thereof, the difference between both of them cannot be sensed. In that sense, the lower-limit intensity is called xe2x80x9ctolerable error intensityxe2x80x9d. When the acoustic signal is quantized and compressed, if the quantization error intensity of the coded/decoded sound for the original sound is quantized so as to make it not larger than the tolerable error intensity, the acoustic signal can be compressed without damaging the quality of the original sound. Therefore, allocation of coded bits only to the slanted-line area shown in FIG. 9 is equivalent to performing quantization such that the quantization error intensity in the respective divided band widths is just equal to the tolerable error intensity.
As to the method of coding the acoustic signal, there exist MPEG (Moving Picture Experts Group) Audio and Dolby Digital, etc. All of them utilize the property as described here. Among those methods, the one having the highest coding efficiency at present is that of MPEG-2 Audio AAC (Advanced Audio Coding) standardized in ISO/IEC13818-7.
FIG. 10 is a block diagram illustrating the fundamental structure of such AAC coding. In FIG. 10, an auditory sense psychology model section 101 calculates the tolerable error intensity per each of the respective band widths of the input acoustic signal separated into blocks along the time axis. On the other hand, conversion to the frequency area with MDCT (Modified Discrete Cosine Transform) is performed in a gain control 102 and a filter bank 103 for the input signal also separated into blocks. A TNS (Temporal Noise Shaping) unit 104 and an estimation unit 106 perform the estimation coding. An intensity/coupling unit 105 and an MS Stereo(Middle Side Stereo) (hereinafter, called abbreviated xe2x80x9cM/Sxe2x80x9d) unit 107 perform a stereo correlation coding process. Thereafter, a normalizing coefficient 108 is determined. The acoustic signal is quantized in a quantizing unit 109 on the basis of the normalizing coefficient 108. The normalizing coefficient corresponds to the tolerable error intensity shown in FIG. 9, and the coefficient is determined per each of the respective divided band widths. After the quantization, the Huffman code is respectively given to the normalizing coefficient and the quantizing value in a noise coding unit 110 on the basis of the predetermined Huffman code list. Finally, a code bit stream is formed in a multiplexer 111.
Now, MDCT in the aforementioned filter bank 103 is the one for overlapping the conversion areas by 50% along the time axis as shown in FIG. 11 and at the same time practicing DCT (Discrete Cosine Transform). Owing to such functions, the occurrence of distortion on the bordering part (boundary) of the respective conversion areas can be suppressed. In AAC (Advance Audio Coding), either one of the long conversion area (long block) of 2048 samples or the eight short conversion areas (short blocks) of respective 256 samples is applied for the input acoustic signal block. Consequently, the number of MDCT coefficients is 1024 for a long block and 128 for short blocks. In the case of employing the short blocks, eight blocks are always applied successively and thereby the number of MDCT coefficients turns out to be same as the MDCT coefficients number at the time of employing a long block.
Generally, a long block is employed in the regular part of small variation in the signal waveform as shown in FIG. 12, while short blocks are employed in the attack part of violent (sharp) variation in the signal waveform. It is important to employ the long and short blocks in these different ways. If the long block is applied to the signal as shown in FIG. 13, a noise called xe2x80x9cpre-echoxe2x80x9d occurs before the essential attack. On the contrary, if the short blocks are applied to the signal as shown in FIG. 12, adequate bit allocation cannot be performed due to insufficient resolution in the frequency area. As a result, a coding efficiency is lowered and noise occurs. The matter is prominent, in particular, for sound of low frequency.
As to the short blocks, there further arises a problem of dividing (separating) these into groups. This dividing into groups signifies that the above-mentioned eight short blocks are put together into groups per each of the successive blocks of the same normalizing coefficient. The effect of reducing the amount of information can be raised by making common the normalizing coefficient in the group. To state this concretely, when the Huffman code is allocated to the normalizing coefficient in the noiseless coding (section) 110 shown in FIG. 10, the code is allocated not per each of the respective short blocks unit but per the group unit. FIG. 14 illustrates an example of dividing it into groups. Here, the number of the groups is three. The number of the blocks in the top group (O-th group) is five, the number of the blocks in the next group (1st group) is 1, and the number of the blocks in the last group (2nd group) is two. If the dividing into groups is not performed suitably, that results in an increase of the code amount (number) and the lowering of the sound quality. If the dividing number of the groups is too large, the normalizing coefficient which should be able to be made common essentially turns out to be coded duplicately (doubly). As a result, coding efficiency is lowered. On the other hand, if the (dividing) number of the groups is too small, since the quantization is performed with the common normalization coefficient in spite of the violent (sharp) variation of the acoustic signal, sound quality is lowered. Moreover, in ISO/IEC13818-7, although there exists a prescription of the code syntax (syntactics) with regard to the division into groups, the concrete standard and method of the division into group have not been taken into consideration.
As mentioned below, with respect to coding, the long block and the short blocks have to be suitably applied for the input acoustic signal block with the above noted distinction therebetween. The auditory sense psychology model section 101 shown in FIG. 10 performs the long/short judgment. An example of the long/short judgment method for the respective blocks to be noticed in the auditory sense psychology model section 101 is shown in the ISO/IEC 13818-7. The outline of the judging process is explained hereinafter.
Step 1: Reconstruction of the Acoustic Signal
1024 samples for a long block are newly read (included) and the signal system (series) of 2048 samples in addition to 1024 samples previously included in the new block is reconstructed, while 128 samples for the short blocks are newly read (included) and the signal system (series) of 256 samples in addition to 128 samples previously included in the new block is reconstructed.
Step 2: Multiplication of Hann Window and FFT
The acoustic signal of 2048 samples (256 samples) constructed in Step 1 is multiplied by the Hann window (Hanning). Furthermore, FFT (Fast Fourier Transform) is practiced and thereby 1024 (128) FFT coefficients are calculated.
Step 3: Calculation of the Estimation Value of the FFT Coefficient
A real number part and an imaginary number part of the respective FFT coefficients in the block being processed is estimated from the real number part and the imaginary number part of the FFT coefficients of (per) preceding two blocks, and then the estimated values of 1024 (128) are respectively calculated.
Step 4: Calculation of the Non-Estimation Possibility Value
Respective non-estimation possibility values are calculated from the estimation values of the real number and the imaginary number of the respective FFT coefficients calculated in Step 2 and those of the respective FFT coefficients calculated in Step 3. Here, the non-estimation possibility value takes a value between 0 and 1. The nearer to 0 the value is, the lower is the pure-sound property of the acoustic signal, while the nearer to 1 the value is , the higher is the pure-sound property of the acoustic signal. In other words, the lower value fact shows that the pure-sound property is low and a noise property is high.
Step 5: Calculation of the Acoustic Signal Intensity and the Non-Estimation Possibility Value in the Respective Divided Band Width
Here, the divided band width corresponds to the one shown in FIG. 9. The intensity of the acoustic signal is calculated on the basis of the respective FFT coefficients calculated in Step 2 per each respective divided band width. Furthermore, the non-estimation possibility value calculated in Step 4 is weighted with the intensity, and the non-estimation possibility value is calculated per each respective divided band width.
Step 6: Folding-in (Convolving) of the Intensity multiplied by the Expanse (Spreading) Function and the Non-Estimation Possibility Value
The effects due to acustic signal intensity and a non-estimation possibility value of the other divided band withd in the respective divided band widths is obatained by use of an expanse (spreading) function. The effects thus obatained are respectively folded in (convoled) and thereby normalized.
Step 7: Calculation of the Pure Sound Property Index
In each respective divided band width b, a pure sound property index tb(b) C=xe2x88x920.299xe2x88x920.43 log.(cb(b)) is calculated on the basis of the folded-in (convolved) non-estimation possibility value (cb(b)) calculated in Step 6. Furthermore, the pure-sound property index is limited within the area between 0 and 1. Here, the above matter shows that the nearer to 1 the index is, the higher is the pure sound property of the acoustic signal, while the nearer to 0 the index is, the higher is the noise property of the acoustic signal.
Step 8: Calculation of the S/N Ratio (Signal-to-Noise Ratio)
The S/N ratio (signal-to-noise ratio) is calculated on the basis of the pure sound property index calculated in Step 7, in the respective divided band widths. Here, the property that the masking effect of the noise component is larger than that of the pure sound component is generally utilized.
Step 9: Calculation of the Intensity Ratio
The ratio of the folded-in acoustic signal intensity and the masking threshold value is calculated on the basis of the S/N ratio calculated in Step 8, in the respective divided band widths.
Step 10: Calculation of the Tolerable Error Intensity (Masking Threshold Value)
The masking threshold value is calculated on the basis of the folded-in acoustic signal intensity calculated in Step 6 and the ratio of the acoustic signal intensity calculated in Step 9 and the masking threshold value, in the respective divided band widths.
Step 11: Adjustment of the Pre-Echo and Consideration of the Absolute Audible (xe2x88x92Frequency) Threshold Value
Pre-echo adjustment is performed for the masking threshold value calculated in Step 10 by use of the tolerable error intensity of the preceding block, in the respective divided band widths. Furthermore, the larger value of the adjusted value and the absolute audio (xe2x88x92frequency) threshold value is employed as the tolerable error intensity of the present block.
Step 12: Calculation of the Perceptual Entropy
The perceptual entropy PE as defined in equation (1) below is respectively calculated for the long block and for the short blocks.
[Equation (1)]                    PE        =                ⁢                  -                                    ∑              b                        ⁢                                          w                ⁡                                  (                  b                  )                                            ⁢                              log                10                            ⁢                                                nb                  ⁡                                      (                    b                    )                                                                                        e                    ⁡                                          (                      b                      )                                                        +                  1                                                                                            =                ⁢                  -                                    ∑              b                        ⁢                                          w                ⁡                                  (                  b                  )                                            ⁡                              [                                                                            log                      10                                        ⁢                                          nb                      ⁡                                              (                        b                        )                                                                              -                                                            log                      10                                        ⁢                                          {                                                                        e                          ⁡                                                      (                            b                            )                                                                          +                        1                                            }                                                                      ]                                                                            =                ⁢                              ∑            b                    ⁢                                    w              ⁡                              (                b                )                                      ⁡                          [                                                                    log                    10                                    ⁢                                      {                                                                  e                        ⁡                                                  (                          b                          )                                                                    +                      1                                        }                                                  -                                                      log                    10                                    ⁢                                      nb                    ⁡                                          (                      b                      )                                                                                  ]                                          
In equation (1), w(b) represents the width of the divided band width b, nb(b) represents the tolerable error intensity in the divided band width b calculated in Step 11, and e(b) represents the intensity of the acoustic signal in the divided band width b calculated in Step 5. Here, PE is thought to correspond to the total of the square measures of the bit allocating areas (slanted-lines areas) as shown in FIG. 9.
Step 13: Judgment of the Long/Short blocks
Regarding the judgment of the long/short blocks, refer to the long/short blocks judging operation flow shown in FIG. 15.
When the value of PE (Step S10) for the long block calculated in Step 12 is larger than a predetermined constant (switch_pe), the processed block is judged to be one of the short blocks (Steps S11 and S12). When the same value of PE is smaller than the predetermined constant, the processed block is judged to be a long block (Steps S11 and S13). Here, the predetermined constant (switch_pe) is a value determined in dependence to the application.
The method mentioned heretofore is the long/short judgment method described in ISO/IEC 13818-7. However, in the above long/short block judgment method, a suitable judgment is not always made. Namely, the part that should be judged to be short is judged to be long (or vice versa) and thereby the sound quality is deteriorated on some occasions.
On the other hand, in the published specification of Japanese Laid-open Patent Publication No. 9-232964, a transient state detecting circuit 2 is constructed such that the input signal is taken in per each of the respective predetermined sections and the square sums thereof are respectively obtained, and the transient state of the above-mentioned signal in accordance with the variation rate (degree) over the at least two or more sections of the signal squarely summed per each of the respective sections. In such structure, it is possible to detect the transient state, that is, the part in which the long/short varies only by performing the calculation of the square sum of the input signal on the time axis without performing any perpendicular (rectangular) conversion processing and filter processing. According to such a method, since the perceptual entropy is not considered by use of only the square sum of the input signal, the judgment coinciding with the audio property cannot always made. Consequently, there is a possibility that the sound quality will deteriorate.
In such a situation, the input acoustic signal block is divided (classified) into several groups such that the difference between the maximum value and the minimum value of the perceptual entropy regarding the respective short blocks in the same group. As the result, there exists a method that, when the groups number is 1, or when the groups number is 1 and the other condition is satisfied, the input acoustic signal block is converted to the frequency area with one long block, and in the other case, the signal block is converted to the frequency area with plural short blocks. The above-mentioned block is further concretely described hereinafter, referring to FIG. 16 illustrating the operation flow thereof. Furthermore, as an example of the input acoustic signal, the acoustic data shown in FIG. 17 are employed and the through-out numbers are attached corresponding to the respective successive eight short blocks in FIG. 17.
At first, the inputted acoustic signal is divided into eight successive short blocks. And then, the perceptual entropies of the eight short blocks are respectively calculated. The calculated values are assumed to be PE(i) (0xe2x89xa6ixe2x89xa67) in order (Step S20). The calculation can be realized by performing, for the respective short blocks, the method explained in the Steps 1 through 12 of the long/short judgment method for the respective processed blocks in the above-mentioned ISO/IEC 13818-7. Next, the initializing operation is performed on the condition of group_len [0]=1, group_len [gnum]=0(0 xe2x89xa6gnumxe2x89xa67(Step S21).
Here, gnum represents the through-out number of a certain group in the overall groups, and group_len [gnum] represents the number of short blocks included in the gnum-th group, and then, the initializing operation is respectively performed on the condition of gnum=0, min=PE(0), and max=PE(0) (Step S20). In the above condition, min and max respectively represent the minimum value and the maximum value of PE(i). In FIG. 18, min and max are respectively equal to 110and 110. (min=110, max=110). Furthermore, the index i is initialized with i=1 (Step S23). The index corresponds to the through-out number of the short blocks.
Next, min or max is renewed in accordance with PE(i). Namely, if PE(i) is smaller than min, min is equal to PE(i), or if PE(i) is larger than max, max is equal to PE(i). (step S24)
PE(i) less than min . . . min=PE(i)
xe2x80x83PE(i)  greater than max . . . max=PE(i)
In the example shown in FIG. 18, if PE(i) greater than max,
max=PE(i). (step S24)
And the classification of the group is judged. (step S25) Namely, the obtained value (maxxe2x88x92min) is compared with a predetermined threshold value th. When the obtained value (maxxe2x88x92min) is equal to or larger than the value th, the step advances to the Step S26 in order to perform the group classification between the short blocks (ixe2x88x921) and i. When the value (maxxe2x88x92min) is smaller than the value th, the short blocks (ixe2x88x921) and i are judged to be included in the same group, and the step advances to the Step S27. In this example, the value th is equal to 50 (th=50). Namely, the group classification is performed such that the difference between the maximum value and the minimum value of the respective short blocks PE(i) included in the same group becomes smaller than 50.
When i=1, since maxxe2x88x92min=110xe2x88x9296=14 less than 50=th, the short blocks 0 and 1 are judge to be included in the same group, and the step advances to the Step S27. Here, since gnum=0, the short blocks 0 and 1 advance to the step S27. Moreover, since gnum=0 here, the short blocks 0 and 1 are included in the 0-th group, and increments, by one, the value of group_len [gnum] (Step S28). This signifies to increase, by one, the number of the short blocks included in the gnum-th group. In the example, since the initialization is performed in the state of gnum=0 and group_len [0]=1, the state becomes group_len [0]=2 in the step S27. That corresponds to the fact that the two blocks in the blocks 0 and I are set as short blocks included in the 0-th group.
Next, the index i is incremented by 1 (Step S28). When i is smaller than 7, the step returns to the Step S24 (Step S29). In this example, since i is equal to 2 ( less than 7), i=2 less than 7, the step returns to the Step S24.
Thereafter, the same operation as described heretofore follows until i=4. When i is equal to 4, since the values of min and max are respectively equal to 96 and 137 in Step S24 of FIG. 16, as shown in FIG. 18, the judgment; maxxe2x88x92min=41 less than 50=th, is performed in Step S25, and the step directly advances from the Step S25 to the Step S27. In the Step 27, group_len [0] becomes equal to 5.
group_len [0]=5
Namely, this corresponds to the fact that the five blocks; 0, 1, 2, 3, and 4 are set as short blocks included in the O-th group. And then, when the step returns again to the Step S24 via the Step S29 after i becomes equal to 5 in Step S28, PE(5) becomes equal to 152 at this time and therefore the values of min and max respectively become equal to 96 and 152. And then, since the judgment; maxxe2x88x92min=56 greater than 50=th is performed in Step S25, the step advances to Step S26. This signifies that the group classification is performed between the short blocks 4 and 5. The value of gnum is incremented by 1 in the Step S26, and the values of min and max are respectively replaced by the newest PE(i). Here, the respective values of gnum, min, and max are 1,152, and 152. The equation gnum=1 corresponds to the fact that the group of the short blocks 5 included therein is the first group.
Next, the value of group_len [1] is incremented by 1 in the Step S27. Since the value of group_len [1 ] has been initialized to 0 (zero) at the Step S21, the value of group_len [1] becomes equal to 1 again in such state. That corresponds to the fact that one block in the block 5 as the short blocks included in the first group.
In the similar way hereinafter, i becomes equal to 6 in the Step S28 of FIG. 16. When the step returns from the Step S29 to the Step S24, since the value of PE(6) becomes equal to 269, next time, as shown in FIG. 18, the values of min and max respectively become equal to 152 and 269. At this time, the judgment of maxxe2x88x92min=117 greater than 50 is performed at the Step S25, and the step advances to the Step S26. Namely, group classification is performed even between the short blocks 5 and 6. And then, gnum=2, min=269, and max=269 in the Step S26, and group_len [2]=1 in the Step S27, and i=7 in the Step S28. Thereafter, since PE(7)=231 in the Step S24 in the same way as in the past, min=231 and max=269, and the judgment of maxxe2x88x92min=38 less than 50 is performed in the Step S25, and the step advance to the Step S27. Namely, both of the short blocks 6 and 7 are included in the second group. In correspondence with the above-mentioned, the value of group_len [2]=2 in the Step S27. Now, when i becomes equal to 8 (i=8) in the next Step S28, the step advances to Step S30 in accordance with the judgment of Step S29. At this time point, the group classification has been completed for all of the eight short blocks.
In this example, the following holds true:
Gnum=2;
Group_len [0]=5;
Group_len [1]=1; and
Group_len [2]=2.
Namely, as a result, the number of the groups is 5, and the numbers of the short blocks included in the respective groups are 5, 1, and 2, for the O-th group, the first group, and the second group, respectively. The above result is same as the example of group classification shown in FIG. 14.
However, there exists a case of not being able to perform suitable judgment of long/short even in this method mentioned above. For instance, there is the case of coding acoustic data including a component of a high pure sound property in a low frequency component (area). The conversion performed by use of the short blocks results in an increase of resolution in the time area, while the resolution in the frequency area is lowered (decreased). On the other hand, the human ear has the masking property of a high resolution in a low frequency area. In particular, only a very narrow frequency band width is masked for a acoustic data of a high pure sound property.
On the contrary, if the acoustic data including the component of a high pure sound property in a low frequency component (area) is converted with the short blocks, the energy of the original (initial) acoustic data is dispersed into the circumferential (peripheral) frequency band width due to the insufficient resolution in the frequency band width caused by the short blocks, and the energy further spreads out over the width of the masking in the low audio frequency which can be heard by the human ear. As the result, the deterioration of the sound quality will be heard. The above-mentioned matter signifies that it is insufficient to simply perform the judgment of long/short only on the basis of perceptual entropy with respect to the short blocks and further, that it is necessary to take into consideration the combination of the pure sound property of the acoustic data and the frequency dependence of the masking property.
In this respect, the input acoustic signal frame is divided into plural short blocks, and it is judged whether the pure sound property index of the acoustic component included in a predetermined one or plural divided band widths (areas) is larger than the threshold value. In case that there exists at least one short block larger than the aforementioned predetermined threshold value in all of the predetermined one or plural divided band widths (areas), it is judged that the input acoustic signal frame is converted to the frequency area with one long block. FIG. 19 illustrates a concrete example of realizing such a method.
FIG. 19 is a flow chart illustrating the operation of a digital acoustic signal coding apparatus. The acoustic data of FIG. 17 are employed as an example of the input acoustic signal. In FIG. 17, the through-out numbers are attached in correspondence with the respective eight successive short blocks.
At first, in connection with the successive eight short blocks i (0xe2x89xa6ixe2x89xa67), the inputted acoustic signal respectively calculates the values of the pure sound property index in the respective divided band widths sfb. Those calculated values are assumed to be tb[i][sfb] (Step S40). Here, as shown in FIG. 17, sfb is the through-out number for recognizing the respective divided band width. The calculation of the pure sound property index is performed by the method explained in the Step 7 in the long/short judgment step for the respective processed blocks in the aforementioned ISO/IEC 13818-7. Next, the initializing operation of tonal-flag=0 is done (Step S41). Furthermore, the through-out number i of the short blocks is initialized as i=0 (Step S42). And then, with respect to the short blocks i, whether the respective pure sound property indices are larger than the predetermined threshold value for the respective divided band widths is searched in the predetermined one or plural divided areas (Step S43). In the example shown in FIG. 19, the search is done with respect to the divided areas; sfb=7, 8, and 9, and the respective pure sound property indices; th7, th8, and th9.
Now, in this example, assume that the values of the pure sound property indices at sfb=7, 8, and 9 are the ones as shown in FIG. 20 with respect to the respective short blocks i, and further assume that the respective threshold values are fixed as follows:
th7=0.6,
th832 0.9, and
th9=0.8.
At the first i=0, the following relationships are brought into existence:
tb[0][7]=0.12 less than 0.6=th7,
tb[0][8]=0.08 less than 0.9=th8, and
tb[0][9]=0.15 less than 0.8=th9.
Consequently, the judgment at Step S43 becomes xe2x80x9cnoxe2x80x9d, and the step advances to the next Step S45. And then, the value i is incremented by 1 and the value i becomes equal to 1 (i=1), and the step returns again to Step S43 via the judgment of Step S46.
Thereafter, the same operation as the aforementioned operation continues until i=5. After i becomes equal to 6 (i=6) (Step S45), the step returns again to Step S43 via Step S46. And then, since the following relationships are brought into existence:
tb[6][7]=0.67 greater than 0.6=th7;
tb[6][8]=0.95 greater than 0.9=th8; and
tb[6][9]=0.89 greater than 0.8=th9,
The judgment in Step S43 becomes xe2x80x9cYesxe2x80x9d, and step advances to Step S44. At this time, the value of tonal_flag becomes equal to 1 (Step S44).
Tonal_flag=1
Next, i becomes equal to 7 (i=7) (Step S45), and the step returns again to Step S43 via Step S43. At the time of i=7, since the following relationships are brought into existence:
tb[7][7]=0.42 less than 0.6=th7;
tb[7][8]=0.84 less than 0.9=th8; and
tb[7][9]=0.81 less than 0.8=th9,
The judgment in the Step S43 becomes xe2x80x9cnoxe2x80x9d, and the step advances to Step S45. On the other hand, the value of tonal_flag is kept at 1 and does not change at all. And then, after i becomes equal to 8 (i=8) (Step S45), the step advances, at this time, to Step S47 via the judgment of Step S46, and then, the value of tonal_flag (Step S47). In this example, since tonal_flag=1, the judgment becomes xe2x80x9cYesxe2x80x9d and the step advances to Step S48. Consequently, it is judged that the inputted acoustic block is MDCT-converted by one long block.
The background arts regarding the digital acoustic signal coding apparatus, the method of coding the digital acoustic signal, and the recording medium for recording the program of coding the digital acoustic signal have been described above.
However, according to such background arts, for instance, and as disclosed in the background-art documents, e.g., the published specification of Japanese Laid-open Patent Publication No. 9-232964 and the other documents relating to MPEG-2 Audio AAC (Advanced Audio Coding) standardized in ISO/IEC 13818-7, MDCT (Modified Discrete Cosine Transform), and the M/S (MS stereo-Middle Side Stereo), etc., there exists no advantageous functional effect for improving the above-mentioned apparatus, method, and recording medium. The present invention has been made in view of the above-mentioned problems and other problems in order to solve the above defects and troublesome matters described relative to the background arts. The present invention, thus, solves the various problems of the background arts mentioned heretofore. The present invention provides an improved digital acoustic signal coding apparatus and method and the improved recording medium for recording the program of coding the digital acoustic signal.
More specifically, the object of the present invention is to solve the problems as mentioned heretofore. Even in the background-art methods mentioned above, the judgment of long/short is not performed suitably on all occasions. Thus, in spite of the conversion by use of the short blocks(s) is essentially the usual method, the result of the above-mentioned background-art group classification becomes 1 group, short blocks are incorrectly judged to be the long block on some occasions.
Furthermore, in FIG. 9, since the smaller (lower) the sampling frequency of the input acoustic signal becomes in the area of the frequency equal to or higher than 4 kHz, the lower becomes the extent of the contribution owing to the absolute audible threshold value, the (total) square measure of the bit allocating areas (slanted-line area in FIG. 9) relatively increases. As a result, the value of the perceptual entropy (PE) calculated in the Step S12 in the long/short blocks judgment method described in the above-mentioned ISO/IEC 13818-7 also becomes gradually large.
On the other hand, when the threshold value with respect to the difference between the sums (sum values) of perceptual entropies of the respective short blocks takes a common value regardless of the sampling frequency, there arises a problem to be solved that, even though the long/short judgment can be suitably performed at a (certain) sampling frequency, the same judgment cannot be suitably performed at other sampling frequencies.
The primary object of the present invention is to solve the above-mentioned problems. According to the invention, the short blocks can be suitably classified into groups without deteriorating sound quality, taking a countermeasure for the difference between the sampling frequencies of the input acoustic signal, and furthermore, the difference of long/short can be correctly judged (discriminated). Another object of the present invention is to provide a digital acoustic signal apparatus, a method of coding the digital acoustic signal, and a recording medium for recording thereon the digital acoustic signal coding program.